package Class.Advance.Inherit.Basis;

class Animal {
    public void eat(){
        System.out.println("吃东西");
    }

    public void drink(){
        System.out.println("喝水");
    }
}

class Cat extends Animal {
    public void catchMice(){
        System.out.println("抓老鼠");
    }
}

class Dog extends Animal{
    public void guard(){
        System.out.println("看家");
    }
}

class Ragdoll extends Cat{
}

class DargonLi extends Cat{
}

class Husky extends Dog{
    public void BreakHome(){
        System.out.println("拆家");
    }
}

class Teddy extends Dog{
    public void rub(){
        System.out.println("蹭一蹭");
    }
}

public class InheritDesign {
    public static void main(String[] args) {
        Ragdoll ragdoll = new Ragdoll();
        ragdoll.catchMice();
    }
}
